-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: statically link ArgumentParserToolInfo always #424
Conversation
This will need some coordination with swift-installer-scripts; I'll write up a patch for that as well. Just wanted to run this past @natecook1000 to make sure that this seems reasonable. |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - let me know when you're ready to coordinate 👍🏻
Now that windows supports static linking as well (to a certain degree), alter the build of swift-argument-parser in CMake to use static linking for ArgumentParserToolInfo always irrespective of whether ArgumentParser is being built as a static library or a dynamic library. On Windows, in release mode, this saves ~32KiB. Additionally, because no tool directly links against this library, no binaries are further expanded by static linking, and we have one less file to distribute.
Seems like this will need to go in first with a tag to allow the remainder to go forward. |
@swift-ci please test |
@natecook1000 whenever you're ready, could you please merge this change and tag it? |
Oh, and for reference, the full joined thing was tested in swiftlang/swift#41914. |
@natecook1000 gentle reminder on this |
Thanks, @compnerd — apologies for the delay! |
* 'main' of github.com:apple/swift-argument-parser: (114 commits) Fix `AsyncParseableCommand` hierarchy (apple#436) Add experimental manual page generation (apple#332) Improving edit distance string extension (apple#446) List valid options in error messages for enum array argument (apple#445) Remove LinuxMain.swift (apple#367) Hide hidden subcommands from completions (apple#443) Update changelog for 1.1.2 release (apple#441) Fix error message for @option array without values (apple#435) Fix Repeat's endless printing (apple#437) build: statically link ArgumentParserToolInfo always (apple#424) Update changelog for the 1.1.1 release (apple#428) build: complete the changes from apple#423 (apple#425) Remove platform requirement from Package.swift (apple#427) build: repair the build after apple#404 (apple#423) Fix broken links/incorrect variance calculation (apple#422) Update changelog for the 1.1.0 release (apple#421) Update documentation (apple#420) Make `@OptionGroup(visibility:)` a public API (apple#419) Support an `async` entry point for commands (apple#404) Fix a typo and template links (apple#418) ...
Now that windows supports static linking as well (to a certain degree),
alter the build of swift-argument-parser in CMake to use static linking
for ArgumentParserToolInfo always irrespective of whether ArgumentParser
is being built as a static library or a dynamic library. On Windows, in
release mode, this saves ~32KiB. Additionally, because no tool directly
links against this library, no binaries are further expanded by static
linking, and we have one less file to distribute.
Replace this paragraph with a description of your changes and rationale. Provide links to an existing issue or external references/discussions, if appropriate.
Checklist